package com.chixing.ih.module.programmer.service.Impl;

import com.chixing.ih.module.programmer.mapper.ProCommunityMapper;
import com.chixing.ih.module.programmer.pojo.ProCommunity;
import com.chixing.ih.module.programmer.service.IProCommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @version 1.0
 * @Author MasterYan
 * @Date 2020/10/3
 * Time: 12:51
 */
@Service
@Transactional
public class ProCommunityServiceImpl implements IProCommunityService {
    @Autowired
    ProCommunityMapper proCommunityMapper;

    @Override
    public boolean updateProCommunity(ProCommunity proCommunity) {
        int record = proCommunityMapper.updateOne(proCommunity);
        if (record > 0)
            return true;
        else
            return false;
    }

    @Override
    public ProCommunity getProCommunity(long userId) {
        ProCommunity proCommunity = proCommunityMapper.getOne(userId);

        return proCommunity;
    }
}
